package top.tangyh.lamp.care.vo.result;

import cn.hutool.core.util.NumberUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
@Schema(description ="执行用药入量明细回参类")
public class ExeYaoOiOutVO {

    @Schema(description ="组合的药名")
    private String medicationName;

    @Schema(description ="已用量")
    private Double usedCounts;

    @Schema(description ="执行时间")
    private Date exeTime;

    @Schema(description ="单位 作废")
    private String unit;

    @Schema(description ="执行用药的开始时间 作废")
    private Date startTime;

    @Schema(description ="执行用药的结束时间 作废")
    private Date endTime;

    @Schema(description ="分组id")
    private String groupId;

    @Schema(description ="true是自己加的 false是 带执字的数据")
    private Boolean isDiy;



    public ExeYaoOiOutVO() {
    }

    public ExeYaoOiOutVO(CountExeYaoDetailTimeRangeBO rangeBO) {
        this.medicationName = rangeBO.getMedicationName();
        this.usedCounts = NumberUtil.round(rangeBO.getTotalCount(), 2).doubleValue();
        this.exeTime = rangeBO.getExeTime();
    }

}
